<template>
  <div>
    <el-menu
      :default-active="activeIndex2"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#3B99FC"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-menu-item index="1" @click="home">首页</el-menu-item>
      <el-submenu index="2">
        <template slot="title"
          >车票</template
        >
        <el-menu-item index="2-1" @click="ticketInquiry">车票查询</el-menu-item>
        <el-menu-item index="2-2" @click="toUseref">个人订票中心</el-menu-item>
      </el-submenu>
      <el-menu-item index="3"><a href="#news" style="text-decoration: none;font-size:14px;">消息中心</a></el-menu-item>
      <el-menu-item index="4"
        ><a href="http://faq.6180339.xyz/formal_faq.html" target="_blank" style="text-decoration: none;font-size:14px;">咨询客服</a></el-menu-item
      >
    </el-menu>
  </div>
</template>
<script>
export default {
  data() {
    return {
      activeIndex2: '1'
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
    ticketInquiry(){
        this.$router.push('/ticketInquiry')
    },
    home(){
        this.$router.push('/')
    },
    toUseref(){
      this.$router.push('/useref')
    }
  }
}
</script>

<style scoped lang="scss">
  .el-menu.el-menu--horizontal{
    border-bottom:0;
  }
</style>